package de.op.projectc.objects;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;

public class GameObject {
	protected Sprite sprite;
	protected Vector2 velocity;
	//private Rectangle bounds;
	
	public GameObject(Texture texture, float x, float y) {
		this.sprite = new Sprite(texture);
		this.sprite.setPosition(x, y);
		
		velocity = new Vector2(0, 0);
		
		this.sprite.setOrigin(this.sprite.getWidth() / 2, this.sprite.getHeight() / 2);
	}
	
	public GameObject(Texture texture, float x, float y, float width, float height) {
		this(texture, x, y);
		this.sprite.setSize(width, height);
		this.sprite.setOrigin(this.sprite.getWidth() / 2, this.sprite.getHeight() / 2);
	}
	
	public float getPositionX() {
		return this.sprite.getX();
	}
	
	public float getPositionY() {
		return this.sprite.getY();
	}
	
	public float getWidth() {
		return this.sprite.getWidth();
	}

	public float getHeight() {
		return this.sprite.getHeight();
	}
	
	public void update(float delta) {
	}
	
	public void render(SpriteBatch spriteBatch) {
	}
}
